import request from "@/router/axios";

export const getViewByProjectId = params => {
  return request({
    url: "/api/blade-measure/measure/projectgaugesubject/viewByProjectId",
    method: "get",
    params: {
      ...params
    }
  });
};
export const getProjectInfo = (current, size, params) => {
  return request({
    url: "/api/blade-measure/measure/projectgaugesubject/listByProjectId",
    method: "get",
    params: {
      ...params,
      current,
      size
    }
  });
};
export const getCensusList = (current, size, params) => {
  return request({
    url: "/api/blade-measure/measure/project/list",
    method: "get",
    params: {
      ...params,
      current,
      size
    }
  });
};
export const getGaugeTypeTree = (current, size, params) => {debugger
  return request({
    url: '/api/blade-measure/measure/projectgaugetype/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const releaseProject = params => {
  return request({
    url: "/api/blade-measure/measure/project/release",
    method: "post",
    data: {
      ...params
    }
  });
};

export const saveCensus = params => {
  return request({
    url: "/api/blade-measure/measure/project/save",
    method: "post",
    data: {
      ...params
    }
  });
};

export const updateCensus = params => {
  return request({
    url: "/api/blade-measure/measure/project/update",
    method: "post",
    data: {
      ...params
    }
  });
};

export const deleteCensus = params => {
  return request({
    url: "/api/blade-measure/measure/project/remove",
    method: "post",
    params: {
      ...params
    }
  });
};

//获取本租户所有测评项目，没有分页功能
export const getList = () => {
  return request({
    url: "/api/blade-measure/measure/userpersonalsummary/project",
    method: "get",
  })
}
